

int main() {
    int number =0;
    scanf("%d",&number);
    int arr[number];
    
    for(int i = 0;i<number;i++){
        scanf("%d",&arr[i]);
    }
    int orderNumber = 0;
    scanf("%d",&orderNumber);
    int orderNumberArr[number+1];

    orderNumberArr[number] = orderNumber;


    for(int i=0;i<sizeof(arr)/sizeof(int);i++){
        orderNumberArr[i] = arr[i];
        
    }

    int len =sizeof(orderNumberArr)/sizeof(int);
    for(int j=0;j<len-1;j++){
        for(int i=j;i<len-1;i++){
            if(orderNumberArr[j]>orderNumberArr[i+1]){
                int temp = orderNumberArr[i+1];
                orderNumberArr[i+1] = orderNumberArr[j];
                orderNumberArr[j] =temp;
                
            }
        }
    }
    
    for(int i=0;i<len;i++){
        printf("%d\n",orderNumberArr[i]);
    }
    
    return 0;
}